<div class="computers view">
    <h2><?php __('Computer'); ?></h2>
    <dl><?php $i = 0;
$class = ' class="altrow"'; ?>
        <dt<?php if ($i % 2 == 0)
            echo $class; ?>><?php __('Id'); ?></dt>
        <dd<?php if ($i++ % 2 == 0)
                echo $class; ?>>
                <?php echo $computer['Computer']['id']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
                    echo $class; ?>><?php __('Audit'); ?></dt>
            <dd<?php if ($i++ % 2 == 0)
                    echo $class; ?>>
                <?php echo $this->Html->link($computer['Audit']['name'], array('controller' => 'audits', 'action' => 'view', $computer['Audit']['id'])); ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
                    echo $class; ?>><?php __('Name'); ?></dt>
            <dd<?php if ($i++ % 2 == 0)
                    echo $class; ?>>
                <?php echo $computer['Computer']['name']; ?>
            &nbsp;
        </dd>
        <dt<?php if ($i % 2 == 0)
                    echo $class; ?>><?php __('Description'); ?></dt>
            <dd<?php if ($i++ % 2 == 0)
                    echo $class; ?>>
                <?php echo $computer['Computer']['description']; ?>
            &nbsp;
        </dd>
    </dl>
    <div class="right">
        <?php echo $this->Html->link(__('Edit Computer', true), array('action' => 'edit', $computer['Computer']['id'])); ?> &nbsp; &nbsp &nbsp;
        <?php echo $this->Html->link(__('Delete Computer', true), array('action' => 'delete', $computer['Computer']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $computer['Computer']['id'])); ?>
            </div>

            <h3><?php __('Hardware Platform'); ?></h3>
            <br />
    <?php if (!empty($computer['Hardware'])): ?>
                    <table cellpadding = "0" cellspacing = "0">
                        <tr>
                            <th><?php __('Manufacturer'); ?></th>
                            <th><?php __('Product Name'); ?></th>
                            <th class="actions"><?php __('Actions'); ?></th>
                        </tr>
        <?php
                    $i = 0;
                    foreach ($computer['Hardware'] as $hardware):
                        $class = null;
                        if ($i++ % 2 == 0) {
                            $class = ' class="altrow"';
                        }
        ?>
                        <tr<?php echo $class; ?>>
                            <td><?php echo $hardware['manufacturer']; ?></td>
                            <td><?php echo $hardware['product_name']; ?></td>
                            <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'hardwares', 'action' => 'view', $hardware['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('controller' => 'hardwares', 'action' => 'edit', $hardware['id']), array('title' => 'Edit Hardware', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                <?php echo $this->Html->link(__('Delete', true), array('controller' => 'hardwares', 'action' => 'delete', $hardware['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $hardware['id'])); ?>
                    </td>
                </tr>
        <?php endforeach; ?>
                    </table>
    <?php endif; ?>
                        <div class="right"><?php echo $this->Html->link(__('New Hardware Platform', true), array('controller' => 'hardwares', 'action' => 'add/' . $computer['Computer']['id']), array('title' => 'Adding new Hardware', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?></div>

                        <h3><?php __('Software Platform'); ?></h3>
    <?php if (!empty($computer['Software'])): ?>
                            <table cellpadding = "0" cellspacing = "0">
                                <tr>
                                    <th><?php __('OS Name'); ?></th>
                                    <th><?php __('Install Date'); ?></th>
                                    <th class="actions"><?php __('Actions'); ?></th>
                                </tr>
        <?php
                            $i = 0;
                            foreach ($computer['Software'] as $software):
                                $class = null;
                                if ($i++ % 2 == 0) {
                                    $class = ' class="altrow"';
                                }
        ?>
                                <tr<?php echo $class; ?>>
                                    <td><?php echo $software['os_name']; ?></td>
                                    <td><?php echo $software['install_date']; ?></td>
                                    <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'softwares', 'action' => 'view', $software['id']), array('title' => 'View Software', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                <?php echo $this->Html->link(__('Edit', true), array('controller' => 'softwares', 'action' => 'edit', $software['id']), array('title' => 'Edit Software', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                <?php echo $this->Html->link(__('Delete', true), array('controller' => 'softwares', 'action' => 'delete', $software['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $software['id'])); ?>
                            </td>
                        </tr>
        <?php endforeach; ?>
                            </table>
    <?php endif; ?>

                                <div class="right">
        <?php echo $this->Html->link(__('New Software', true), array('controller' => 'softwares', 'action' => 'add/' . $computer['Computer']['id']), array('title' => 'Adding new Software', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                            </div>

                        

                            <h3><?php __('Product Keys'); ?></h3>
    <?php if (!empty($computer['Productkey'])): ?>
                                    <table cellpadding = "0" cellspacing = "0">
                                        <tr>
                                            <th><?php __('Product'); ?></th>
                                            <th><?php __('Key'); ?></th>
                                            <th class="actions"><?php __('Actions'); ?></th>
                                        </tr>
        <?php
                                    $i = 0;
                                    foreach ($computer['Productkey'] as $productkey):
                                        $class = null;
                                        if ($i++ % 2 == 0) {
                                            $class = ' class="altrow"';
                                        }
        ?>
                                        <tr<?php echo $class; ?>>
                                            <td><?php echo $productkey['product']; ?></td>
                                            <td><?php echo $productkey['key']; ?></td>
                                            <td class="actions">
                <?php echo $this->Html->link(__('Edit', true), array('controller' => 'productkeys', 'action' => 'edit', $productkey['id']), array('title' => 'Adding a new Product Key', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                <?php echo $this->Html->link(__('Delete', true), array('controller' => 'productkeys', 'action' => 'delete', $productkey['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $productkey['id'])); ?>
                                    </td>
                                </tr>
        <?php endforeach; ?>
                                    </table>
    <?php endif; ?>

                                        <div class="right">
        <?php echo $this->Html->link(__('New Productkey', true), array('controller' => 'productkeys', 'action' => 'add/' . $computer['Computer']['id']), array('title' => 'Adding a new Product Key', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                                    </div>


                                    <h3><?php __('Networks'); ?></h3>
    <?php if (!empty($computer['Network'])): ?>
                                            <table cellpadding = "0" cellspacing = "0">
                                                <tr>
                                                    <th><?php __('Name'); ?></th>
                                                    <th class="actions"><?php __('Actions'); ?></th>
                                                </tr>
        <?php
                                            $i = 0;
                                            foreach ($computer['Network'] as $network):
                                                $class = null;
                                                if ($i++ % 2 == 0) {
                                                    $class = ' class="altrow"';
                                                }
        ?>
                                                <tr<?php echo $class; ?>>
                                                    <td><?php echo $network['name']; ?></td>
                                                    <td class="actions">
                <?php echo $this->Html->link(__('View', true), array('controller' => 'networks', 'action' => 'view', $network['id'])); ?>
                <?php echo $this->Html->link(__('Edit', true), array('controller' => 'networks', 'action' => 'edit', $network['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
                <?php echo $this->Html->link(__('Delete', true), array('controller' => 'networks', 'action' => 'delete', $network['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $network['id'])); ?>
                                            </td>
                                        </tr>
        <?php endforeach; ?>
                                            </table>
    <?php endif; ?>

                                                <div class="right">
        <?php echo $this->Html->link(__('New Network', true), array('controller' => 'networks', 'action' => 'add/' . $computer['Computer']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
    </div>
</div>